package cn.iocoder.yudao.module.api.trade.order.enums;

import com.baomidou.mybatisplus.annotation.EnumValue;
import lombok.Getter;
import lombok.RequiredArgsConstructor;

/**
 * 订单操作类型的枚举
 *
 * @author 陈賝
 * @since 2023/7/6 15:31
 */
@RequiredArgsConstructor
@Getter
public enum TradeOrderOperateTypeEnum {

    MEMBER_CREATE(1, "用户下单"),
    ADMIN_UPDATE_PRICE(2, "订单价格 {oldPayPrice} 修改，调整价格 {adjustPrice}，实际支付金额为 {newPayPrice} 元"),

    MEMBER_PAY(10, "用户付款成功"),
    ADMIN_UPDATE_ADDRESS(11, "收货地址修改"),

    ADMIN_ACCEPT(15, "商家已接单"),
    SYSTEM_ACCEPT(15, "系统已自动接单"),
    //SYSTEM_ASSIGN(16, "已分配配送人员：{riderName}"),
    ADMIN_PACK(17, "商家已出餐"),
    RIDER_PICKUP(20, "配送员已取餐"),
    ADMIN_DELIVERY(20, "已发货，快递公司：{deliveryName}，快递单号：{logisticsNo}"),

    RIDER_ARRIVE(29, "配送员已送达"),
    MEMBER_RECEIVE(30, "用户已收货"),
    SYSTEM_RECEIVE(31, "到期未收货，系统自动确认收货"),
    SYSTEM_SUPPLY_RECEIVE(31, "根据供应渠道状态系统自动修改为已收货"),
    ADMIN_VERIFY(32, "管理员核销"),
    SHOP_STAFF_VERIFY(32, "店员核销"),

    MEMBER_COMMENT(33, "用户评价"),
    SYSTEM_COMMENT(34, "到期未评价，系统自动评价"),

    MEMBER_CANCEL(40, "取消订单"),
    SYSTEM_CANCEL(41, "到期未支付，系统自动取消订单"),
    ADMIN_CANCEL(42, "管理员取消订单"),
    SYSTEM_CANCEL_BY_AFTER_SALE(43, "订单全部售后完成，系统自动取消订单"),
    MEMBER_REFUND(44, "用户退款成功"),
    MEMBER_DELETE(49, "删除订单"),

    MEMBER_AFTER_SALE_APPLY(60, "用户申请售后"),
    SYSTEM_AFTER_SALE_PART(65, "订单部分退款成功"),
    ;

    /**
     * 操作类型
     */
    @EnumValue
    private final Integer type;
    /**
     * 操作描述
     */
    private final String content;

}
